<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath()%>/js/easyui/themes/metro/easyui.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/validate/validate.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/easyui/easyui.js"></script>
<script type="text/javascript">
	$(function() {
		$("#sform").validate({
			rules : {
				ipsNo : {
					required : true
				},
				ipsType : {
					required : true
				},
				ipsCountry : {
					required : true
				},
				ipsMin : {
					required : true
				},
				ipsMax : {
					required : true
				},
				ipsState : {
					required : true
				},
				ipsRemark : {
					required : false
				}
			},
			errorPlacement : function(error, element) {
				element.css("border-color", "#1c3e57");
			},
		});
	});
</script>
</head>
<body>
	<div class="easyui-panel" title="编辑面板" style="width: 100%;" data-options="fit:true">
		<form id="sform" action="ips_save.html" method="post" enctype="multipart/form-data">
			<table width="90%">
				<tr>
					<td height="30" align="right" width="200"><b></b></td>
					<td width="300"><b>内容</b></td>
					<td><b>说明</b></td>
				</tr>
				<tr>
					<td></td>
					<td colspan="2"><hr /></td>
				</tr>
				<tr>
					<td height="30" align="right">ip类型 :</td>
					<td><s:radio id="ipsType" name="ipsType" list="#{'IPV4':'IPV4','IPV6':'IPV6'}" value="ipsBean.ipsType"></s:radio></td>
					<td>ip类型</td>
				</tr>
				<tr>
					<td height="30" align="right">所属国家 :</td>
					<td><s:select id="ipsCountry" name="ipsCountry" list="@dicts.CountryDict@COUNTRY_MAP" value="ipsBean.ipsCountry" /></td>
					<td>所属国家</td>
				</tr>
				<tr>
					<td height="30" align="right">起始IP :</td>
					<td><input type="text" placeholder="起始IP" name="ipsMin" id="ipsMin" value="<s:property value="ipsBean.ipsMin"/>" /></td>
					<td>起始IP</td>
				</tr>
				<tr>
					<td height="30" align="right">起始IP整数表示 :</td>
					<td><input type="text" placeholder="起始IP整数表示" name="ipsMinnum" id="ipsMinnum" value="<s:if test="ipsBean.ipsMinnum!=null"><s:text name="global.format.number"><s:param value="ipsBean.ipsMinnum"/></s:text></s:if>"
						onkeyup="value=value.replace(/[^\d\.]/g,'')" /></td>
					<td>起始IP整数表示</td>
				</tr>
				<tr>
					<td height="30" align="right">结束IP :</td>
					<td><input type="text" placeholder="结束IP" name="ipsMax" id="ipsMax" value="<s:property value="ipsBean.ipsMax"/>" /></td>
					<td>结束IP</td>
				</tr>
				<tr>
					<td height="30" align="right">结束IP整数表示 :</td>
					<td><input type="text" placeholder="结束IP整数表示" name="ipsMaxnum" id="ipsMaxnum" value="<s:if test="ipsBean.ipsMaxnum!=null"><s:text name="global.format.number"><s:param value="ipsBean.ipsMaxnum"/></s:text></s:if>"
						onkeyup="value=value.replace(/[^\d\.]/g,'')" /></td>
					<td>结束IP整数表示</td>
				</tr>
				<tr>
					<td height="30" align="right">是否可用 :</td>
					<td><s:radio id="ipsState" name="ipsState" list="#{'0':'无效','1':'有效'}" value="ipsBean.ipsState"></s:radio></td>
					<td>是否可用</td>
				</tr>
				<tr>
					<td></td>
					<td colspan="2"><hr /></td>
				</tr>

				<tr>
					<td height="30" align="right"></td>
					<td><input type="button" class="submit" value="提交单据" onclick="if($('#sform').valid()){$('#sform').submit();}" /> <input type="button" class="submit" value="返回上级" onclick="history.go(-1);" /></td>
					<td></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>

